package com.market.manager;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.market.domain.Product;
import com.market.domain.ProductPrice;
import com.market.domain.Weekly;

public interface WeeklyManager extends GenericManager<Weekly, Long> {
	
	
	/**
	 * This method fetch all product the inventory is not zero, but not in the 
	 * specified weekly
	 * 
	 * @param weekly
	 * @return
	 */	
	public List<Product> fetchProductsInStockNotInWeekly(Weekly weekly);
	
	/**
	 * load all product Price are associated with this weekly
	 * @param user
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
	public List<ProductPrice> fetchProductPrices(Weekly weekly);
	
	/**
	 * load all weeklys are active
	 * @param 
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
	public List<Weekly> fetchActiveWeeklys();
}
